<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>3D 魔方 - Three.js</title>
    <link rel="stylesheet" href="./style.css" />
  </head>
  <body>
    <div id="ui">
      <div class="panel">
        <div class="row">
          <button id="btn-scramble" class="btn primary">打乱</button>
          <button id="btn-reset" class="btn">复原</button>
          <button id="btn-undo" class="btn">撤销</button>
          <button id="btn-redo" class="btn">重做</button>
        </div>
        <div class="row">
          <label class="slider-label">转动速度</label>
          <input id="speed" type="range" min="120" max="800" step="20" value="280" />
          <span id="speed-value">280ms</span>
        </div>
        <div class="row small">
          <span id="status">准备就绪</span>
        </div>
      </div>
      <button id="btn-help" class="floating">?</button>
      <div id="help" class="help hidden">
        <div class="help-content">
          <h3>玩法与操作</h3>
          <ul>
            <li>鼠标在魔方外空白处拖拽：旋转整块魔方</li>
            <li>鼠标按住某个面并在该面上拖拽：旋转该面所在层</li>
            <li>触摸设备同理，单指拖拽即可</li>
            <li>支持：打乱、复原、撤销/重做、转动速度调节</li>
          </ul>
          <p>小提示：转动时有动画与悬浮高亮，尽情玩耍！</p>
          <button id="btn-close-help" class="btn">关闭</button>
        </div>
      </div>
    </div>

    <script type="module" src="./app.js"></script>
  </body>
</html> 